A timer is a device which can be set to furnish an interrupt or a timeout indication at a specific time instant or after a selected time interval. Timers are required in communication systems in which typical protocols require that a very large number of simultaneously occurring tasks or events be supervised to detect whether they occurred within predetermined delays. A START operation is sent by the user to start the timer in order to supervise a corresponding event. When the supervision of an event has to be interrupted for different reasons, a STOP operation is generated by the corresponding user. After a while, the supervision of the corresponding event may be requested to start once again, then a START operation is generated by the user. While the timer associated with an event is still running, the user may request a RESTART operation in order to delay the timing of the corresponding event.
In communication systems, because the transmission time of messages between users is very short, thousands of START, RESTART and STOP operations are generated at nearly the same time by the users for supervising many events. In that environment, these operations need to be performed very efficiently in order not to impair the performance of the communication systems.
Timer arrangements generally comprise a timer control block (TCB) associated with each event where time-out delay is to be controlled. These TCBs are managed (i.e. chained, updated or removed from a chain) under control of a program. FIG. 1-A represents a simple chained structure of TCBs which are doubly linked in order to make easier the deletions and insertions of TCBs in the TCB chain. Each new TCB is simply added to the end of the chain in response to a START operation and the timer which has to be deleted in response to a STOP operation is easily removed from the chain thanks to the double links. This simple structure is not adapted to control a large number of outstanding events because, at every time increment (timer-tick), it is necessary to scan the entire chain to detect if the time-out delay of any event has elapsed.
This scan on each timer tick can be avoided by chaining the TCBs in the order in which the corresponding events are awaited. FIG. 1-B shows the implementation of an ordered list TCB chain structure whose performance is better than that of the chain structure of FIG. 1-A. In the subject mechanism, a new TCB is inserted in the correct point of the chain. This operation is facilitated by the fact that the TCBs are doubly linked. However, this is done at the cost of introducing a chain scan every time the supervision of a new event is needed. This implementation is possible when the system does not require several thousands of timer control blocks.
The EP application A1 355 243 discloses a timer device which enables, in a multiple timer arrangement, simple setting and cancelling of timers. In it, each timer has a corresponding timeout value and a timer tag. A specific time scale register and a clock divider are provided so that the resolution of the timer is easily selectable. To allow existence of several timers expiring at the same time, a special timer service with chainable timer control block is provided in order to delete all of a chain of timers which expire at the same time. A drawback of this device is that it is not adapted to an environment where the START, RESTART and STOP operations may occur one after the other, almost simultaneously and before the timeout occurs. This complicates the updating of the time-out which has to be added to the current contents of the cyclic counter to generate a new address, at which the timer tag is stored, thus establishing a new timer.